import $http from "@/utils/http";

const { get, post, put } = $http;
const commonUrl = "/store/info";
// 首页
// 获取首页典型案例
const getHomeCase = () => get(`${commonUrl}/index/control/hotCaseList.do`);
// 获取首页新闻
const getIndexNews = () => get(`${commonUrl}/config/tool/control/listIndexNews.do`);

// 智能能源
const getGoodsList = (params) => get(`${commonUrl}/indexGW/control/listAllGoods.do`, params);
const getGoodsInfo = (params) => get(`${commonUrl}/index/control/getGoodsInfo.do`, params);

// 典型案例列表
const getCaseLists = (params) => get(`${commonUrl}/index/control/caseList.do`, params);

// 典型案例详情
const getCaseDetail = (params) => get(`${commonUrl}/index/control/getCaseInfo.do`, params);

// 新闻列表
const getNewsLists = (params) => get(`${commonUrl}/config/tool/control/listNews.do`, params);

// 新闻详情
const getNewsDetail = (params) => get(`${commonUrl}/config/tool/control/getNewsDetail.do`, params);
export default {
  getHomeCase,
  getIndexNews,
  getGoodsList,
  getGoodsInfo,
  getCaseLists,
  getCaseDetail,
  getNewsLists,
  getNewsDetail,
};
